import React from "react";

export default class ColorBox extends React.Component{
    constructor(props){
        super();
        this.state={
            color:props.color,
            text:props.text,
            width:props.width,
            height:props.height
        };
    }
    render(){
        return (
            <span style={{fontSize:"16px",paddingLeft:"10px",paddingRight:"10px",width:this.state.width,height:this.state.height,backgroundColor:this.state.color,borderRadius:"5px",color:"white"}}>
                {this.state.text}
            </span>
        )
    }
}